#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>
using namespace std;

class Solution {
public:
    int firstUniqChar(string s)
    {
        int flag = 1;

        for (int i = 0; i < s.size(); i++)
        {
            flag = 1;
            for (int j = 0; j < s.size(); j++)
            {

                if (s[i] == s[j]&&i!=j)
                {
                    flag = 0;
                    break;
                }
            }
            if (flag)
            {
                return i;
            }
        }
        return -1;

    }
};

int main()
{
    string s;
    cin >> s;
    Solution solu;
    cout << solu.firstUniqChar(s);

    return 0;
}